import Home from '../page/home'
import Login from '../page/login'

import UserList from '../page/userList'
import UserAdd from '../page/userAdd'
import ProductAdd from '../page/productAdd'
import ProductList from '../page/productList'
import Index from '../page/index'
const routes = [{
	path: '/login',
	component: Login
}, {
	path: '/',
	component: Home,
	children: [{
		path: '/user/list',
		name: '用户列表',
		component: UserList
	}, {
		path: '/user/add',
		name: '添加用户',
		component: UserAdd
	}, {
		path: '/product/list',
		name: '产品列表',
		component: ProductList
	}, {
		path: '/product/add',
		name: '添加产品',
		component: ProductAdd
	}, {
		path: '/index',
		component: Index
	}, {
		from: '/',
		to: '/index'
	}]
}]

export const menuList = [{
	path: '/index',
	name: '首页',
}, {
	path: '/user',
	name: '用户管理',
	children: [{
		path: '/user/list',
		name: '用户列表',
	},{
		path: '/user/add',
		name: '添加用户',
	}]
},{
	path: '/product',
	name: '产品管理',
	children: [{
		path: '/product/list',
		name: '产品列表',
	},{
		path: '/product/add',
		name: '添加产品',
	}]
}]

export default routes